Skip to content

HYPERFLEET-978 - feat: (2/2) Include routes in API for PUT status updates #135

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-hyperfleet:mainfrom
ma-hill:HYPERFLEET-978
May 15, 2026
Merged

HYPERFLEET-978 - feat: (2/2) Include routes in API for PUT status updates #135
openshift-merge-bot[bot] merged 1 commit into
openshift-hyperfleet:mainfrom
ma-hill:HYPERFLEET-978

Conversation

@ma-hill
Copy link
Copy Markdown
Contributor

@ma-hill ma-hill commented May 12, 2026

Summary

Removes the POST endpoints for adapter status updates on clusters and nodepools, keeping only PUT endpoints. This simplifies the API surface by eliminating redundancy. Adapters now exclusively use PUT to report status.

Changes

  • Removed POST route handlers from plugins/clusters/plugin.go for both cluster and nodepool statuses
  • Updated all integration tests to use PutClusterStatuses and PutNodePoolStatuses instead of PostClusterStatuses and PostNodePoolStatuses

Test Plan

  • Unit tests added/updated
  • make test-all passes
  • make lint passes
  • API spec changes validated with make generate-all
  • Integration tests updated and passing

Jira Issue

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 12, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 2950af1f-73ff-4730-a4b8-32f5b0036334

📥 Commits

Reviewing files that changed from the base of the PR and between 3655df8 and a48e6ec.

📒 Files selected for processing (3)
  • plugins/clusters/plugin.go
  • test/integration/clusters_test.go
  • test/integration/node_pools_test.go
💤 Files with no reviewable changes (1)
  • plugins/clusters/plugin.go

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Cluster and nodepool adapter status endpoints now use PUT HTTP method instead of POST for status submissions and updates.
    • Integration test suites for cluster lifecycle management (soft-delete and hard-delete) and nodepool management have been updated to reflect the new PUT endpoint methods, including validation of adapter status records during deletion completion.

Walkthrough

This pull request switches the HTTP method for cluster and nodepool adapter status reporting endpoints from POST to PUT. Two route registrations in plugins/clusters/plugin.go are updated to accept PUT instead of POST for the /{id}/statuses and /{id}/nodepools/{nodepool_id}/statuses paths. All integration tests that exercise these endpoints across cluster and nodepool deletion flows are updated to call the corresponding PUT response methods instead of POST, maintaining the same request payloads and assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: switching from POST to PUT endpoints for status updates in the API.
Description check ✅ Passed The description is well-related to the changeset, explaining the removal of POST endpoints and migration to PUT-only status updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@ma-hill ma-hill closed this May 15, 2026
@ma-hill ma-hill reopened this May 15, 2026
@ma-hill ma-hill changed the title HYPERFLEET-978 - feat: Use PUT for status updates (2/2) HYPERFLEET-978 - feat: (2/2) Include routes in API for PUT status updates May 15, 2026
@ma-hill ma-hill marked this pull request as ready for review May 15, 2026 15:58
@openshift-ci openshift-ci Bot requested review from Mischulee and rh-amarin May 15, 2026 15:58
@ma-hill
Copy link
Copy Markdown
Contributor Author

ma-hill commented May 15, 2026

/retest

Copy link
Copy Markdown
Contributor

@pnguyen44 pnguyen44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One comment now that the status endpoints are PUT-only, consider renaming Create to Upsert on the handlers to match the semantics.

Copy link
Copy Markdown
Contributor

@pnguyen44 pnguyen44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pnguyen44

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit d898158 into openshift-hyperfleet:main May 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants